<?php
	$name = $_POST['name'];
	$link = $_POST['link'];
	$logo = $_FILES['logo']['name'];
	$aktif = $_POST['status'];

	$acak=rand(0000,9999);
	$lokasi_file=$_FILES['logo']['tmp_name'];
	$nama_file1=$_FILES['logo']['name'];
	$nama_file=$acak.$nama_file1;
	move_uploaded_file($lokasi_file,"../patner/"."$nama_file");
	
	$sttmt = $koneksi->exec("insert into patner (nama_perusahaan,link,logo,aktif) values ('$name','$link','$nama_file','$aktif')");

	$url_sukses='utama.php?module=mod_partner';

	if($sttmt){
		echo "<meta http-equiv='refresh' content='0; url=$url_sukses'>";
		exit;
	}else{
		echo mysql_error();
	}
?>